from django.views.generic.list_detail import object_list
from django.conf.urls.defaults import *
from openlabyrinth.models import Labyrinth

urlpatterns = patterns('openlabyrinth.views',
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/export/$', 'admin_exportLabyrinth', name="ol-exportLabyrinth"),
    url(r'^administration/labyrinths/create/$', 'admin_createLabyrinth', name="ol-createLabyrinth"),
    url(r'^administration/labyrinths/$', 'admin_readLabyrinths', name="ol-readLabyrinths"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/$', 'admin_readLabyrinth', name="ol-readLabyrinth"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/update/$', 'admin_updateLabyrinth', name="ol-updateLabyrinth"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/delete/$', 'admin_deleteLabyrinth', name="ol-deleteLabyrinth"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/nodes/create/$', 'admin_createNode', name="ol-createNode"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/nodes/$', 'admin_readNodes', name="ol-readNodes"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/node/(?P<nodeID>\d+)/$', 'admin_updateNode', name="ol-updateNode"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/node/(?P<nodeID>\d+)/delete/$', 'admin_deleteNode', name="ol-deleteNode"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/node/(?P<nodeID>\d+)/root/$', 'admin_setRootNode', name="ol-setRootNode"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/node/(?P<nodeID>\d+)/links/create/$', 'admin_createLink', name="ol-createLink"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/node/(?P<nodeID>\d+)/links/$', 'admin_readLinks', name="ol-readLinks"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/node/(?P<nodeID>\d+)/link/(?P<linkID>\d+)/$', 'admin_updateLink', name="ol-updateLink"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/node/(?P<nodeID>\d+)/link/(?P<linkID>\d+)/delete/$', 'admin_deleteLink', name="ol-deleteLink"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/counters/create/$', 'admin_createCounter', name="ol-createCounter"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/counters/$', 'admin_readCounters', name="ol-readCounters"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/counter/(?P<counterID>\d+)/$', 'admin_updateCounter', name="ol-updateCounter"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/counter/(?P<counterID>\d+)/delete/$', 'admin_deleteCounter', name="ol-deleteCounter"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/assets/create/$', 'admin_createAsset', name="ol-createAsset"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/assets/$', 'admin_readAssets', name="ol-readAssets"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/asset/(?P<assetID>\d+)/$', 'admin_updateAsset', name="ol-updateAsset"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/asset/(?P<assetID>\d+)/delete/$', 'admin_deleteAsset', name="ol-deleteAsset"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/sections/create/$', 'admin_createSection', name="ol-createSection"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/sections/$', 'admin_readSections', name="ol-readSections"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/section/(?P<sectionID>\d+)/$', 'admin_updateSection', name="ol-updateSection"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/section/(?P<sectionID>\d+)/delete/$', 'admin_deleteSection', name="ol-deleteSection"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/feedback/create/$', 'admin_createFeedback', name="ol-createFeedback"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/feedback/$', 'admin_readFeedback', name="ol-readFeedback"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/feedback/(?P<feedbackID>\d+)/$', 'admin_updateFeedback', name="ol-updateFeedback"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/feedback/(?P<feedbackID>\d+)/delete/$', 'admin_deleteFeedback', name="ol-deleteFeedback"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/questions/create/$', 'admin_createQuestion', name="ol-createQuestion"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/questions/$', 'admin_readQuestions', name="ol-readQuestions"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/question/(?P<questionID>\d+)/$', 'admin_updateQuestion', name="ol-updateQuestion"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/question/(?P<questionID>\d+)/delete/$', 'admin_deleteQuestion', name="ol-deleteQuestion"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/elements/create/$', 'admin_createElement', name="ol-createElement"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/elements/create/(?P<elementType>\w+)/$', 'admin_createElement', name="ol-createElementTyped"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/elements/$', 'admin_readElements', name="ol-readElements"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/element/(?P<elementID>\d+)/(?P<elementType>\w+)/$', 'admin_updateElement', name="ol-updateElement"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/element/(?P<elementID>\d+)/delete/(?P<elementType>\w+)/$', 'admin_deleteElement', name="ol-deleteElement"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/clusters/create/$', 'admin_createCluster', name="ol-createCluster"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/clusters/$', 'admin_readClusters', name="ol-readClusters"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/cluster/(?P<clusterID>\d+)/$', 'admin_updateCluster', name="ol-updateCluster"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/cluster/(?P<clusterID>\d+)/delete/$', 'admin_deleteCluster', name="ol-deleteCluster"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/cluster/(?P<clusterID>\d+)/clusterItem/(?P<clusterItemID>\d+)/delete/$', 'admin_deleteClusterItem', name="ol-deleteClusterItem"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/avatars/create/$', 'admin_createAvatar', name="ol-createAvatar"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/avatars/$', 'admin_readAvatars', name="ol-readAvatars"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/avatar/(?P<avatarID>\d+)/$', 'admin_updateAvatar', name="ol-updateAvatar"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/avatar/(?P<avatarID>\d+)/delete/$', 'admin_deleteAvatar', name="ol-deleteAvatar"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/reports/$', 'admin_readReports', name="ol-readReports"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/report/(?P<reportID>\d+)/$', 'admin_readReport', name="ol-readReport"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/report/(?P<reportID>\d+)/delete/$', 'admin_deleteReport', name="ol-deleteReport"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/remoteStateObservers/create/$', 'admin_createRemoteStateObserver', name="ol-createRemoteStateObserver"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/remoteStateObservers/$', 'admin_readRemoteStateObservers', name="ol-readRemoteStateObservers"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/remoteStateObserver/(?P<remoteStateObserverID>\d+)/$', 'admin_updateRemoteStateObserver', name="ol-updateRemoteStateObserver"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/remoteStateObserver/(?P<remoteStateObserverID>\d+)/delete/$', 'admin_deleteRemoteStateObserver', name="ol-deleteRemoteStateObserver"),
    url(r'^administration/labyrinth/(?P<labyrinthID>\d+)/visualEditor/$', 'admin_visualEditor', name="ol-visualEditor"),
    url(r'^administration/users/create/$', 'admin_createUser', name="ol-createUser"),
    url(r'^administration/users/$', 'admin_readUsers', name="ol-readUsers"),
    url(r'^administration/user/(?P<userID>\d+)/$', 'admin_updateUser', name="ol-updateUser"),
    url(r'^administration/user/(?P<userID>\d+)/delete/$', 'admin_deleteUser', name="ol-deleteUser"),
    url(r'^administration/skins/create/$', 'admin_createSkin', name="ol-createSkin"),
    url(r'^administration/skins/$', 'admin_readSkins', name="ol-readSkins"),
    url(r'^administration/skin/(?P<skinID>\d+)/$', 'admin_updateSkin', name="ol-updateSkin"),
    url(r'^administration/skin/(?P<skinID>\d+)/delete/$', 'admin_deleteSkin', name="ol-deleteSkin"),
    url(r'^administration/$', 'admin_dashboard', name="ol-adminRoot"),
    url(r'^login/$', 'loginUser', name="ol-loginUser"),
    url(r'^logout/$', 'logoutUser', name="ol-logoutUser"),
    url(r'^restart/$', 'restartLabyrinth', name="ol-restartLabyrinth"),
    url(r'^exit/$', 'exitLabyrinth', name="ol-exitLabyrinth"),
    url(r'^session/delete/$', 'deleteSession', name="ol-deleteSession"),
    url(r'^session/update/$', 'updateSession', name="ol-updateSession"),
    url(r'^session/read/$', 'readSession', name="ol-readSession"),
    url(r'^session/create/$', 'createSession', name="ol-createSession"),
    url(r'^labyrinth/(?P<labyrinthID>\d+)/node/(?P<nodeID>\d+)/data/$', 'getNode', name="ol-getNode"),
    url(r'^labyrinth/(?P<labyrinthID>\d+)/root/data/$', 'getNode', {'root': True}, name="ol-getRootNode"),
    url(r'^labyrinth/(?P<labyrinthID>\d+)/node/(?P<nodeID>\d+)/data/classic/$', 'getNode', {'mode': 'classic'}, name="ol-getNode-classic"),
    url(r'^labyrinth/(?P<labyrinthID>\d+)/root/data/classic/$', 'getNode', {'root': True, 'mode': 'classic'}, name="ol-getRootNode-classic"),
    url(r'^labyrinth/(?P<labyrinthID>\d+)/data/$', 'getLabyrinth', name="ol-getLabyrinth"),
    url(r'^labyrinths/data/$', 'getLabyrinths', name="ol-getLabyrinths"),
    url(r'^report/time/(?P<reportID>\d+)/data/$', 'getTimeReport', name="ol-getTimeReport"),
    url(r'^report/counter/(?P<reportID>\d+)/data/$', 'getCounterReport', name="ol-getCounterReport"),
    url(r'^reports/$', 'getReportViewer', name="ol-getReportViewer"),
    url(r'^reports/data/$', 'readReports', name="ol-readReports"),
    url(r'^report/(?P<reportID>\d+)/data/$', 'readReport', name="ol-readReport"),
    url(r'^$', 'getRoot', name="ol-root"),
    url(r'^home/$', 'home', name="ol-home"),
    url(r'^((?P<sessionID>\w+)/)?labyrinth/(?P<labyrinthID>\d+)/$', 'getNodeViewer', name="ol-getNodeViewer"),
)
